home *** CD-ROM | disk | FTP | other *** search
- From: mforget@elfhaven.ersys.edmonton.ab.ca (Michel Forget)
- Subject: Re: GEM apps, in general
- Date: Wed, 20 Jul 1994 23:12:58 -0600
- Precedence: bulk
-
- Hello Evan,
-
- >========================================================================
- >I'm not sure I follow your comment. My -experience- is that I do not know
- >assembly language, and therefore have no real use for an assembly level
- >debugger. What on earth can you possibly object to in that?
- >========================================================================
- >
- >In my EXPERIENCE I have used both kinds of debuggers. Both have their
- >uses. I do know assembly language, 3 or 4 of them, but I fail to see
- >what ANY of this has to do with GEM. Will using TIMER events slow the
- >system? Yes! Why? Because the program is running instead of waiting.
- [...]
-
- I think you got confused somewhere. You quoted my comment, then went
- on to blast me for things I never said. You meant Ken, right?
-
- >So, do us all a favor, and work to illimintae polling from your apps.
-
- Just in case someone thought your comments were directed at me; none of
- my applications use the sort of polling being discussed. As Even says,
- I call evnt_multi() once and wait for something to happen. When it does,
- I deal with it and then call evnt_multi() again. I do not use timer
- events (except once or twice to slow down a visual effect, and that can
- be disabled). I completely agree that calling evnt_multi()/objc_find()/
- wind_find() in a tight loop would be a nightmare for MultiTOS (or any
- other MultiTasking operating system).
-
- >Of course, rectangles are just 4 words, or a pointer to 4 words. Using
- >them is easy. Drawing graphics for a large pixel-map takes a considerable
- >amount of CPU power. The overhead of the rectangles is nothing by
- >comparison. That is why I use point-to-type and let my background windows
- >scroll in TOSWIN.
-
- Your example source code was interesting. Do you have any that shows how
- to scroll a window using the rectangle list and raster copies? That
- would be a pretty complex operation, I would think.
-
- >8K chunks is best. When running protected all memory is dolled out in
- >8K chunks anyway, so you might as well only Malloc() in that size.
-
- That would defeat the purpose, though. If you allocate memory in 8K
- chunks, then load a 200K document, TOS 1.0 is toast. Any ideas?
- As for how this relates to GEM programming, how about this? "Memory
- allocation for raster copies from the screen to a buffer." (Flimsy,
- huh?) :)
-
- >1 - No Polling
-
- Agreed.
-
- >2 - No vector grabbing!
-
- This depends on your application. If it is an AUTO folder program
- designed to replace the file selector, you need to grab a vector. A
- regular application, though, should not grab vectors.
-
- >3 - All graphics in windows (including window 0 with proper wind_set)
-
- What? Why would you want to do anything to window handle 0 (the
- desktop)?
-
- >4 - Always walk rectangles
-
- Of course.
-
- >5 - Don't assume screen or memory formats.
-
- Always check for Mxalloc() and use that if it is available.
-
- >6 - Free unused memory
-
- Well, sure.
-
- >7 - No polling!
- >8 - No vector grabbing!
-
- Deja Vu!
-
- >9 - No form_do() or other locking calls.
-
- Hold on, though. An alert box is a "locking" call, yet there are
- legitimate uses for it. You can have alert boxes in windows (ESS-Code
- does this) but they should at least be modal to the application showing
- the alert box.
-
- >10 - no dialog-ware or alert-ware
-
- For this I agree, sort of. If the dialog is in a window, then there is
- not problem (since it is non-modal). Using form_do() would be a bad
- idea, though.
-
- >========================================================================
- >If an ACC doesn't call menu_register, does it still take up a `slot'?
- >========================================================================
- >
- >Depends on the internals of GEM. Good question!!! I can't answer that.
-
- I have a feeling that it does. Maybe not, though, since you can have
- two or three entries in one accessory slot.
-
- You know, I'm learning a lot from this list. Not all of it is about
- GEM programming, but I have no problem with that... :)
-
-
- --
- Michel Forget \\ mforget@elfhaven.ersys.edmonton.ab.ca //
- Electric Storm Software \\ ess@tibalt.supernet.ab.ca //
- PGP Public Key Finger. = 1F C0 D3 FE 40 51 7F 47 F3 4A C6 AD 6E 02 71 85
-